Optimal. Leaf size=40 \[ -\frac {a \cos (x)}{b^2}+\frac {\cos ^2(x)}{2 b}+\frac {\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2747, 711}
\begin {gather*} \frac {\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}-\frac {a \cos (x)}{b^2}+\frac {\cos ^2(x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 711
Rule 2747
Rubi steps
\begin {align*} \int \frac {\sin ^3(x)}{a+b \cos (x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {b^2-x^2}{a+x} \, dx,x,b \cos (x)\right )}{b^3}\\ &=-\frac {\text {Subst}\left (\int \left (a-x+\frac {-a^2+b^2}{a+x}\right ) \, dx,x,b \cos (x)\right )}{b^3}\\ &=-\frac {a \cos (x)}{b^2}+\frac {\cos ^2(x)}{2 b}+\frac {\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 40, normalized size = 1.00 \begin {gather*} -\frac {a \cos (x)}{b^2}+\frac {\cos (2 x)}{4 b}+\frac {\left (a^2-b^2\right ) \log (a+b \cos (x))}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 39, normalized size = 0.98
method | result | size |
default | \(-\frac {-\frac {\left (\cos ^{2}\left (x \right )\right ) b}{2}+a \cos \left (x \right )}{b^{2}}+\frac {\left (a^{2}-b^{2}\right ) \ln \left (a +b \cos \left (x \right )\right )}{b^{3}}\) | \(39\) |
norman | \(\frac {\frac {2 a \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{b^{2}}-\frac {2 a -2 b}{3 b^{2}}+\frac {\left (4 a +2 b \right ) \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{3 b^{2}}}{\left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}+\frac {\left (a -b \right ) \left (a +b \right ) \ln \left (a \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {x}{2}\right )\right )+a +b \right )}{b^{3}}-\frac {\left (a -b \right ) \left (a +b \right ) \ln \left (\tan ^{2}\left (\frac {x}{2}\right )+1\right )}{b^{3}}\) | \(111\) |
risch | \(-\frac {i x \,a^{2}}{b^{3}}+\frac {i x}{b}+\frac {{\mathrm e}^{2 i x}}{8 b}-\frac {a \,{\mathrm e}^{i x}}{2 b^{2}}-\frac {a \,{\mathrm e}^{-i x}}{2 b^{2}}+\frac {{\mathrm e}^{-2 i x}}{8 b}+\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 a \,{\mathrm e}^{i x}}{b}+1\right ) a^{2}}{b^{3}}-\frac {\ln \left ({\mathrm e}^{2 i x}+\frac {2 a \,{\mathrm e}^{i x}}{b}+1\right )}{b}\) | \(111\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 38, normalized size = 0.95 \begin {gather*} \frac {b \cos \left (x\right )^{2} - 2 \, a \cos \left (x\right )}{2 \, b^{2}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left (b \cos \left (x\right ) + a\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 41, normalized size = 1.02 \begin {gather*} \frac {b^{2} \cos \left (x\right )^{2} - 2 \, a b \cos \left (x\right ) + 2 \, {\left (a^{2} - b^{2}\right )} \log \left (-b \cos \left (x\right ) - a\right )}{2 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1421 vs.
\(2 (34) = 68\).
time = 167.90, size = 1421, normalized size = 35.52 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 39, normalized size = 0.98 \begin {gather*} \frac {b \cos \left (x\right )^{2} - 2 \, a \cos \left (x\right )}{2 \, b^{2}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left ({\left | b \cos \left (x\right ) + a \right |}\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 38, normalized size = 0.95 \begin {gather*} \frac {{\cos \left (x\right )}^2}{2\,b}+\frac {\ln \left (a+b\,\cos \left (x\right )\right )\,\left (a^2-b^2\right )}{b^3}-\frac {a\,\cos \left (x\right )}{b^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________